<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ibustshare</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="IBust Reference Manual">
<link rel="up" href="ch06.html" title="Internal">
<link rel="prev" href="IBustObject.html" title="IBustObject">
<link rel="next" href="ibust-ibusttypes.html" title="ibusttypes">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="IBustObject.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch06.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">IBust Reference Manual</th>
<td><a accesskey="n" href="ibust-ibusttypes.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#ibust-ibustshare.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#ibust-ibustshare.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="ibust-ibustshare"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ibust-ibustshare.top_of_page"></a>ibustshare</span></h2>
<p>ibustshare — Shared utility functions and definition.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ibust-ibustshare.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="ibust-ibustshare.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">#define             <a class="link" href="ibust-ibustshare.html#IBUST-INTERFACE-CONFIG:CAPS" title="IBUST_INTERFACE_CONFIG">IBUST_INTERFACE_CONFIG</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-INTERFACE-ENGINE:CAPS" title="IBUST_INTERFACE_ENGINE">IBUST_INTERFACE_ENGINE</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-INTERFACE-FACTORY:CAPS" title="IBUST_INTERFACE_FACTORY">IBUST_INTERFACE_FACTORY</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-INTERFACE-IBUST:CAPS" title="IBUST_INTERFACE_IBUST">IBUST_INTERFACE_IBUST</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-INTERFACE-INPUT-CONTEXT:CAPS" title="IBUST_INTERFACE_INPUT_CONTEXT">IBUST_INTERFACE_INPUT_CONTEXT</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-INTERFACE-NOTIFICATIONS:CAPS" title="IBUST_INTERFACE_NOTIFICATIONS">IBUST_INTERFACE_NOTIFICATIONS</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-INTERFACE-PANEL:CAPS" title="IBUST_INTERFACE_PANEL">IBUST_INTERFACE_PANEL</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-PATH-CONFIG:CAPS" title="IBUST_PATH_CONFIG">IBUST_PATH_CONFIG</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-PATH-FACTORY:CAPS" title="IBUST_PATH_FACTORY">IBUST_PATH_FACTORY</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-PATH-IBUST:CAPS" title="IBUST_PATH_IBUST">IBUST_PATH_IBUST</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-PATH-INPUT-CONTEXT:CAPS" title="IBUST_PATH_INPUT_CONTEXT">IBUST_PATH_INPUT_CONTEXT</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-PATH-NOTIFICATIONS:CAPS" title="IBUST_PATH_NOTIFICATIONS">IBUST_PATH_NOTIFICATIONS</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-PATH-PANEL:CAPS" title="IBUST_PATH_PANEL">IBUST_PATH_PANEL</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-SERVICE-CONFIG:CAPS" title="IBUST_SERVICE_CONFIG">IBUST_SERVICE_CONFIG</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-SERVICE-IBUST:CAPS" title="IBUST_SERVICE_IBUST">IBUST_SERVICE_IBUST</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-SERVICE-NOTIFICATIONS:CAPS" title="IBUST_SERVICE_NOTIFICATIONS">IBUST_SERVICE_NOTIFICATIONS</a>
#define             <a class="link" href="ibust-ibustshare.html#IBUST-SERVICE-PANEL:CAPS" title="IBUST_SERVICE_PANEL">IBUST_SERVICE_PANEL</a>
<span class="returnvalue">void</span>                <a class="link" href="ibust-ibustshare.html#ibust-free-strv" title="ibust_free_strv ()">ibust_free_strv</a>                      (<em class="parameter"><code><span class="type">gchar</span> **strv</code></em>);
const <span class="returnvalue">gchar</span> *       <a class="link" href="ibust-ibustshare.html#ibust-get-address" title="ibust_get_address ()">ibust_get_address</a>                    (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">glong</span>               <a class="link" href="ibust-ibustshare.html#ibust-get-daemon-uid" title="ibust_get_daemon_uid ()">ibust_get_daemon_uid</a>                 (<em class="parameter"><code><span class="type">void</span></code></em>);
const <span class="returnvalue">gchar</span> *       <a class="link" href="ibust-ibustshare.html#ibust-get-local-machine-id" title="ibust_get_local_machine_id ()">ibust_get_local_machine_id</a>           (<em class="parameter"><code><span class="type">void</span></code></em>);
const <span class="returnvalue">gchar</span> *       <a class="link" href="ibust-ibustshare.html#ibust-get-socket-path" title="ibust_get_socket_path ()">ibust_get_socket_path</a>                (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">gint</span>                <a class="link" href="ibust-ibustshare.html#ibust-get-timeout" title="ibust_get_timeout ()">ibust_get_timeout</a>                    (<em class="parameter"><code><span class="type">void</span></code></em>);
const <span class="returnvalue">gchar</span> *       <a class="link" href="ibust-ibustshare.html#ibust-get-user-name" title="ibust_get_user_name ()">ibust_get_user_name</a>                  (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="ibust-ibustshare.html#ibust-init" title="ibust_init ()">ibust_init</a>                           (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="ibust-ibustshare.html#ibust-key-event-from-string" title="ibust_key_event_from_string ()">ibust_key_event_from_string</a>          (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> *keyval</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> *modifiers</code></em>);
const <span class="returnvalue">gchar</span> *       <a class="link" href="ibust-ibustshare.html#ibust-key-event-to-string" title="ibust_key_event_to_string ()">ibust_key_event_to_string</a>            (<em class="parameter"><code><span class="type">guint</span> keyval</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> modifiers</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="ibust-ibustshare.html#ibust-main" title="ibust_main ()">ibust_main</a>                           (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="ibust-ibustshare.html#ibust-quit" title="ibust_quit ()">ibust_quit</a>                           (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="ibust-ibustshare.html#ibust-set-display" title="ibust_set_display ()">ibust_set_display</a>                    (<em class="parameter"><code>const <span class="type">gchar</span> *display</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="ibust-ibustshare.html#ibust-set-log-handler" title="ibust_set_log_handler ()">ibust_set_log_handler</a>                (<em class="parameter"><code><span class="type">gboolean</span> verbose</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="ibust-ibustshare.html#ibust-unset-log-handler" title="ibust_unset_log_handler ()">ibust_unset_log_handler</a>              (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="ibust-ibustshare.html#ibust-write-address" title="ibust_write_address ()">ibust_write_address</a>                  (<em class="parameter"><code>const <span class="type">gchar</span> *address</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="ibust-ibustshare.description"></a><h2>Description</h2>
<p>
This file defines some utility functions and definition
which are shared among ibust component and services.
</p>
</div>
<div class="refsect1">
<a name="ibust-ibustshare.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="IBUST-INTERFACE-CONFIG:CAPS"></a><h3>IBUST_INTERFACE_CONFIG</h3>
<pre class="programlisting">#define IBUST_INTERFACE_CONFIG   "org.freedesktop.IBust.Config"
</pre>
<p>
D-Bus interface for IBust config.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-INTERFACE-ENGINE:CAPS"></a><h3>IBUST_INTERFACE_ENGINE</h3>
<pre class="programlisting">#define IBUST_INTERFACE_ENGINE   "org.freedesktop.IBust.Engine"
</pre>
<p>
D-Bus interface for IBust engine.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-INTERFACE-FACTORY:CAPS"></a><h3>IBUST_INTERFACE_FACTORY</h3>
<pre class="programlisting">#define IBUST_INTERFACE_FACTORY  "org.freedesktop.IBust.Factory"
</pre>
<p>
D-Bus interface for IBust factory.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-INTERFACE-IBUST:CAPS"></a><h3>IBUST_INTERFACE_IBUST</h3>
<pre class="programlisting">#define IBUST_INTERFACE_IBUST     "org.freedesktop.IBust"
</pre>
<p>
D-Bus interface for IBust.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-INTERFACE-INPUT-CONTEXT:CAPS"></a><h3>IBUST_INTERFACE_INPUT_CONTEXT</h3>
<pre class="programlisting">#define             IBUST_INTERFACE_INPUT_CONTEXT</pre>
<p>
D-Bus interface for IBust input context.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-INTERFACE-NOTIFICATIONS:CAPS"></a><h3>IBUST_INTERFACE_NOTIFICATIONS</h3>
<pre class="programlisting">#define IBUST_INTERFACE_NOTIFICATIONS    "org.freedesktop.IBust.Notifications"
</pre>
<p>
D-Bus interface for IBust notifications.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-INTERFACE-PANEL:CAPS"></a><h3>IBUST_INTERFACE_PANEL</h3>
<pre class="programlisting">#define IBUST_INTERFACE_PANEL    "org.freedesktop.IBust.Panel"
</pre>
<p>
D-Bus interface for IBust panel.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-PATH-CONFIG:CAPS"></a><h3>IBUST_PATH_CONFIG</h3>
<pre class="programlisting">#define IBUST_PATH_CONFIG        "/org/freedesktop/IBust/Config"
</pre>
<p>
D-Bus path for IBust config.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-PATH-FACTORY:CAPS"></a><h3>IBUST_PATH_FACTORY</h3>
<pre class="programlisting">#define IBUST_PATH_FACTORY       "/org/freedesktop/IBust/Factory"
</pre>
<p>
D-Bus path for IBust factory.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-PATH-IBUST:CAPS"></a><h3>IBUST_PATH_IBUST</h3>
<pre class="programlisting">#define IBUST_PATH_IBUST          "/org/freedesktop/IBust"
</pre>
<p>
D-Bus path for IBust
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-PATH-INPUT-CONTEXT:CAPS"></a><h3>IBUST_PATH_INPUT_CONTEXT</h3>
<pre class="programlisting">#define IBUST_PATH_INPUT_CONTEXT "/org/freedesktop/IBust/InputContext_%d"
</pre>
<p>
Template of D-Bus path for IBust input context.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-PATH-NOTIFICATIONS:CAPS"></a><h3>IBUST_PATH_NOTIFICATIONS</h3>
<pre class="programlisting">#define IBUST_PATH_NOTIFICATIONS "/org/freedesktop/IBust/Notifications"
</pre>
<p>
D-Bus path for IBust notifications.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-PATH-PANEL:CAPS"></a><h3>IBUST_PATH_PANEL</h3>
<pre class="programlisting">#define IBUST_PATH_PANEL         "/org/freedesktop/IBust/Panel"
</pre>
<p>
D-Bus path for IBust panel.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-SERVICE-CONFIG:CAPS"></a><h3>IBUST_SERVICE_CONFIG</h3>
<pre class="programlisting">#define IBUST_SERVICE_CONFIG     "org.freedesktop.IBust.Config"
</pre>
<p>
Address of IBust config service.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-SERVICE-IBUST:CAPS"></a><h3>IBUST_SERVICE_IBUST</h3>
<pre class="programlisting">#define IBUST_SERVICE_IBUST       "org.freedesktop.IBust"
</pre>
<p>
Address of IBust service.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-SERVICE-NOTIFICATIONS:CAPS"></a><h3>IBUST_SERVICE_NOTIFICATIONS</h3>
<pre class="programlisting">#define IBUST_SERVICE_NOTIFICATIONS    "org.freedesktop.IBust.Notifications"
</pre>
<p>
Address of IBust notification service.
</p>
</div>
<hr>
<div class="refsect2">
<a name="IBUST-SERVICE-PANEL:CAPS"></a><h3>IBUST_SERVICE_PANEL</h3>
<pre class="programlisting">#define IBUST_SERVICE_PANEL      "org.freedesktop.IBust.Panel"
</pre>
<p>
Address of IBust panel service.
</p>
</div>
<hr>
<div class="refsect2">
<a name="ibust-free-strv"></a><h3>ibust_free_strv ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                ibust_free_strv                      (<em class="parameter"><code><span class="type">gchar</span> **strv</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">ibust_free_strv</code> is deprecated and should not be used in newly-written code. This function has been deprecated and should
not be used in newly written code.</p>
</div>
<p>
Free a list of strings.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>strv</code></em> :</span></p></td>
<td>List of strings.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-get-address"></a><h3>ibust_get_address ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *       ibust_get_address                    (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Return the D-Bus address of IBust.
It will find the address from following source:
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><p>Environment variable IBUST_ADDRESS</p></li>
<li class="listitem"><p>Socket file under ~/.config/ibust/bus/</p></li>
</ol></div>
<p>
</p>
<p>
See also: <a class="link" href="ibust-ibustshare.html#ibust-write-address" title="ibust_write_address ()"><code class="function">ibust_write_address()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>D-Bus address of IBust. <code class="literal">NULL</code> for not found.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-get-daemon-uid"></a><h3>ibust_get_daemon_uid ()</h3>
<pre class="programlisting"><span class="returnvalue">glong</span>               ibust_get_daemon_uid                 (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">ibust_get_daemon_uid</code> is deprecated and should not be used in newly-written code. This function has been deprecated and should
not be used in newly written code.</p>
</div>
<p>
Get UID of ibust-daemon.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>UID of ibust-daemon; or 0 if UID is not available.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-get-local-machine-id"></a><h3>ibust_get_local_machine_id ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *       ibust_get_local_machine_id           (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Obtains the machine UUID of the machine this process is running on.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated string that shows the UUID of the machine.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-get-socket-path"></a><h3>ibust_get_socket_path ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *       ibust_get_socket_path                (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Get the path of socket file.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated string that stores the path of socket file.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-get-timeout"></a><h3>ibust_get_timeout ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>                ibust_get_timeout                    (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Get the GDBus timeout in milliseconds. The timeout is for clients (e.g. im-ibust.so), not for ibust-daemon.
Note that the timeout for ibust-daemon could be set by --timeout command line option of the daemon.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A GDBus timeout in milliseconds. -1 when default timeout for GDBus should be used.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-get-user-name"></a><h3>ibust_get_user_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *       ibust_get_user_name                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Get the current user name.
It is determined by:
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><p><code class="function">getlogin()</code></p></li>
<li class="listitem"><p>Environment variable SUDO_USER</p></li>
<li class="listitem"><p>Environment variable USERHELPER_UID</p></li>
<li class="listitem"><p>Environment variable USERNAME</p></li>
<li class="listitem"><p>Environment variable LOGNAME</p></li>
<li class="listitem"><p>Environment variable USER</p></li>
<li class="listitem"><p>Environment variable LNAME</p></li>
</ol></div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated string that stores current user name.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-init"></a><h3>ibust_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                ibust_init                           (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Init the ibust types.
</p>
<p>
It is actually a wrapper of <code class="function">g_type_init()</code>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="ibust-key-event-from-string"></a><h3>ibust_key_event_from_string ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            ibust_key_event_from_string          (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> *keyval</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> *modifiers</code></em>);</pre>
<p>
Parse key event string and return key symbol and modifiers.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>Key event string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>keyval</code></em> :</span></p></td>
<td>Variable that hold key symbol result.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>modifiers</code></em> :</span></p></td>
<td>Variable that hold modifiers result.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE for succeed; FALSE if failed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-key-event-to-string"></a><h3>ibust_key_event_to_string ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *       ibust_key_event_to_string            (<em class="parameter"><code><span class="type">guint</span> keyval</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> modifiers</code></em>);</pre>
<p>
Return the name of a key symbol and modifiers.
</p>
<p>
For example, if press ctrl, shift, and enter, then this function returns:
Shift+Control+enter.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>keyval</code></em> :</span></p></td>
<td>Key symbol.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>modifiers</code></em> :</span></p></td>
<td>Modifiers such as Ctrl or Shift.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The name of a key symbol and modifier.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-main"></a><h3>ibust_main ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                ibust_main                           (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Runs an IBust main loop until <a class="link" href="ibust-ibustshare.html#ibust-quit" title="ibust_quit ()"><code class="function">ibust_quit()</code></a> is called in the loop.
</p>
<p>
See also: <a class="link" href="ibust-ibustshare.html#ibust-quit" title="ibust_quit ()"><code class="function">ibust_quit()</code></a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="ibust-quit"></a><h3>ibust_quit ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                ibust_quit                           (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Stops an IBust from running.
</p>
<p>
Any calls to <a class="link" href="ibust-ibustshare.html#ibust-quit" title="ibust_quit ()"><code class="function">ibust_quit()</code></a> for the loop will return.
See also: <a class="link" href="ibust-ibustshare.html#ibust-main" title="ibust_main ()"><code class="function">ibust_main()</code></a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="ibust-set-display"></a><h3>ibust_set_display ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                ibust_set_display                    (<em class="parameter"><code>const <span class="type">gchar</span> *display</code></em>);</pre>
<p>
Set the display address.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td>Display address, as in DISPLAY environment for X.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-set-log-handler"></a><h3>ibust_set_log_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                ibust_set_log_handler                (<em class="parameter"><code><span class="type">gboolean</span> verbose</code></em>);</pre>
<p>
Sets GLIB's log handler to ours. Our log handler adds time info
including hour, minute, second, and microsecond, like:
</p>
<p>
(ibust-daemon:7088): IBUST-DEBUG: 18:06:45.822819: ibust-daemon started
</p>
<p>
If <em class="parameter"><code>verbose</code></em> is <code class="literal">TRUE</code>, all levels of messages will be logged. Otherwise,
DEBUG and WARNING messages will be ignored.  The function is used in
ibust-daemon, but can be useful for IBust client programs as well for
debugging. It's totally fine for not calling this function. If you
don't set a custom GLIB log handler, the default GLIB log handler will
be used.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>verbose</code></em> :</span></p></td>
<td>TRUE for verbose logging.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-unset-log-handler"></a><h3>ibust_unset_log_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                ibust_unset_log_handler              (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Remove the log handler which is set by ibust_set_log_handler.
</p>
</div>
<hr>
<div class="refsect2">
<a name="ibust-write-address"></a><h3>ibust_write_address ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                ibust_write_address                  (<em class="parameter"><code>const <span class="type">gchar</span> *address</code></em>);</pre>
<p>
Write D-Bus address to socket file.
</p>
<p>
See also: <a class="link" href="ibust-ibustshare.html#ibust-get-address" title="ibust_get_address ()"><code class="function">ibust_get_address()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>D-Bus address of IBust.</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>
